package com.dianneng.show.model;

import com.dianneng.show.util.CommonUtil;

import java.io.Serializable;
import java.util.List;

public class DayInfo extends BaseResult implements Serializable {


    private List<DataBean> data;

    public List<DataBean> getData() {
        return data;
    }

    public void setData(List<DataBean> data) {
        this.data = data;
    }

    public static class DataBean implements Serializable{
        /**
         * sn : 190526023323
         * eq : 44
         * vtA : 2194
         * vtB : 0
         * vtC : 0
         * ecA : 129
         * ecB : 0
         * ecC : 0
         * ap : 251
         * apA : 0
         * apB : 0
         * apC : 0
         * awp : 800049
         * awpA : 0
         * awpB : 0
         * awpC : 0
         * pf : 984
         * pfA : 0
         * pfB : 0
         * pfC : 0
         * hz : 5001
         * createtime : 2019-07-16 11:43:27
         */

        private String sn;
        private float eq;
        private float vtA;
        private float vtB;
        private float vtC;
        private float ecA;
        private float ecB;
        private float ecC;
        private float ap;
        private float apA;
        private float apB;
        private float apC;
        private float awp;
        private float awpA;
        private float awpB;
        private float awpC;
        private float pf;
        private float pfA;
        private float pfB;
        private float pfC;
        private float hz;
        private String createtime;


        private String diannengS;

        private String dianyaABC;

        private String dianliuABC;

        private String shunshiyouS;

        private String shunshiyouABC;

        private String shunshiwuS;

        private String shunshiwuABC;

        private String zongyinshuS;

        private String zongyinshuABC;

        private String dianwangS;

        private String time;

        public String getTime() {
            return time;
        }

        public void setTime(String time) {
            this.time = time;
        }

        public void setDiannengS(String diannengS) {
            this.diannengS = diannengS;
        }

        public void setDianyaABC(String dianyaABC) {
            this.dianyaABC = dianyaABC;
        }

        public void setDianliuABC(String dianliuABC) {
            this.dianliuABC = dianliuABC;
        }

        public void setShunshiyouS(String shunshiyouS) {
            this.shunshiyouS = shunshiyouS;
        }

        public void setShunshiyouABC(String shunshiyouABC) {
            this.shunshiyouABC = shunshiyouABC;
        }

        public void setShunshiwuS(String shunshiwuS) {
            this.shunshiwuS = shunshiwuS;
        }

        public void setShunshiwuABC(String shunshiwuABC) {
            this.shunshiwuABC = shunshiwuABC;
        }

        public void setZongyinshuS(String zongyinshuS) {
            this.zongyinshuS = zongyinshuS;
        }

        public void setZongyinshuABC(String zongyinshuABC) {
            this.zongyinshuABC = zongyinshuABC;
        }

        public void setDianwangS(String dianwangS) {
            this.dianwangS = dianwangS;
        }

        public String getDiannengS() {
            return diannengS;
        }

        public String getDianyaABC() {
            return dianyaABC;
        }

        public String getDianliuABC() {
            return dianliuABC;
        }

        public String getShunshiyouS() {
            return shunshiyouS;
        }

        public String getShunshiyouABC() {
            return shunshiyouABC;
        }

        public String getShunshiwuS() {
            return shunshiwuS;
        }

        public String getShunshiwuABC() {
            return shunshiwuABC;
        }

        public String getZongyinshuS() {
            return zongyinshuS;
        }

        public String getZongyinshuABC() {
            return zongyinshuABC;
        }

        public String getDianwangS() {
            return dianwangS;
        }

        private boolean isTitle;

        public boolean isTitle() {
            return isTitle;
        }

        public void setTitle(boolean title) {
            isTitle = title;
        }

        public String getSn() {
            return sn;
        }

        public void setSn(String sn) {
            this.sn = sn;
        }

        public float getEq() {
            return eq/100f;
        }

        public void setEq(float eq) {
            this.eq = eq;
        }

        public float getVtA() {
            return vtA/10f;
        }

        public void setVtA(float vtA) {
            this.vtA = vtA;
        }

        public float getVtB() {
            return vtB/10f;
        }

        public void setVtB(float vtB) {
            this.vtB = vtB;
        }

        public float getVtC() {
            return vtC/10f;
        }

        public void setVtC(float vtC) {
            this.vtC = vtC;
        }

        public float getEcA() {
            return ecA/1000f;
        }

        public void setEcA(float ecA) {
            this.ecA = ecA;
        }

        public float getEcB() {
            return ecB/1000f;
        }

        public void setEcB(float ecB) {
            this.ecB = ecB;
        }

        public float getEcC() {
            return ecC/1000f;
        }

        public void setEcC(float ecC) {
            this.ecC = ecC;
        }

        public float getAp() {
            return ap/10000f;
        }

        public void setAp(float ap) {
            this.ap = ap;
        }

        public float getApA() {
            return apA/10000f;
        }

        public void setApA(float apA) {
            this.apA = apA;
        }

        public float getApB() {
            return apB/10000f;
        }

        public void setApB(float apB) {
            this.apB = apB;
        }

        public float getApC() {
            return apC/10000f;
        }

        public void setApC(float apC) {
            this.apC = apC;
        }

        public float getAwp() {
            return awp/10000f;
        }

        public void setAwp(float awp) {
            this.awp = awp;
        }

        public float getAwpA() {
            return awpA/10000f;
        }

        public void setAwpA(float awpA) {
            this.awpA = awpA;
        }

        public float getAwpB() {
            return awpB/10000f;
        }

        public void setAwpB(float awpB) {
            this.awpB = awpB;
        }

        public float getAwpC() {
            return awpC/10000f;
        }

        public void setAwpC(float awpC) {
            this.awpC = awpC;
        }

        public float getPf() {
            return pf/1000f;
        }

        public void setPf(float pf) {
            this.pf = pf;
        }

        public float getPfA() {
            return pfA/1000f;
        }

        public void setPfA(float pfA) {
            this.pfA = pfA;
        }

        public float getPfB() {
            return pfB/1000f;
        }

        public void setPfB(float pfB) {
            this.pfB = pfB;
        }

        public float getPfC() {
            return pfC/1000f;
        }

        public void setPfC(float pfC) {
            this.pfC = pfC;
        }

        public float getHz() {
            return hz/100f;
        }

        public void setHz(float hz) {
            this.hz = hz;
        }

        public String getCreatetime() {
            return createtime;
        }

        public void setCreatetime(String createtime) {
            this.createtime = createtime;
        }
    }
    public static DayInfo.DataBean setTitle(){
        DayInfo.DataBean snInfo=new DayInfo.DataBean();

        snInfo.setTitle(true);
        snInfo.setSn("电表编号");
        snInfo.setDiannengS("有功总电能\n(kW·h)");
        snInfo.setDianyaABC("电压\nA相/B相/C相(V)");
        snInfo.setDianliuABC("电流\nA相/B相/C相(A)");
        snInfo.setShunshiyouS("瞬时总有功\n功率(kW)");
        snInfo.setShunshiyouABC("瞬时总有功功率\nA相/B相/C相(kW)");
        snInfo.setShunshiwuS("瞬时总无功\n功率(kvar)");
        snInfo.setShunshiwuABC("瞬时总无功功率\nA相/B相/C相(kvar)");
        snInfo.setZongyinshuS("总功率\n因数");
        snInfo.setZongyinshuABC("功率因数\nA相/B相/C相");
        snInfo.setDianwangS("电网频率\n(Hz)");
        snInfo.setTime("数据采样\n时间");
        return snInfo;
    }

    public static DayInfo.DataBean getHandleData(DayInfo.DataBean snInfo){

        snInfo.setTitle(false);
        snInfo.setSn(snInfo.getSn());
        snInfo.setDiannengS(snInfo.getEq()+"");
        snInfo.setDianyaABC(snInfo.getVtA()+"/"+snInfo.getVtB()+"/"+snInfo.getVtC());
        snInfo.setDianliuABC(snInfo.getEcA()+"/"+snInfo.getEcB()+"/"+snInfo.getEcC());
        snInfo.setShunshiyouS(snInfo.getAp()+"");
        snInfo.setShunshiyouABC(snInfo.getApA()+"/"+snInfo.getApB()+"/"+snInfo.getApC());
        snInfo.setShunshiwuS(snInfo.getAwp()+"");
        snInfo.setShunshiwuABC(snInfo.getAwpA()+"/"+snInfo.getAwpB()+"/"+snInfo.getAwpC());
        snInfo.setZongyinshuS(snInfo.getPf()+"");
        snInfo.setZongyinshuABC(snInfo.getPfA()+"/"+snInfo.getPfB()+"/"+snInfo.getPfC());
        snInfo.setDianwangS(snInfo.getHz()+"");
        snInfo.setTime(CommonUtil.getTime11(snInfo.getCreatetime()));
        return snInfo;
    }

}
